package com.boot.action;

import com.boot.po.CityPo;
import com.boot.service.CityService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>@description:</p>
 *
 * @projectName: spring-boot-redis
 * @packageName: com.boot.action
 * @className:
 * @author: shuangyang
 * @date: 17-7-9 下午9:20
 */
@RestController
@RequestMapping(value = "/city")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class CityAction {
    private final CityService cityService;

    @RequestMapping(value = "/getTest")
    public CityPo getTest() {

        try {
            int id=1;
            return cityService.getTest(id);
        } catch (Exception e) {
            e.fillInStackTrace();
        }
        return null;

    }

}
